package com.kjjt.vo;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

public class DemoVo {

    @NotBlank(message = "姓名不能为空，请检查！")
    private String name;

    @Min(value = 18, message = "年龄太小了")
    @Max(value = 60, message = "年龄太大了")
    @NotNull(message = "年龄不能为空")
    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
